Assigned ozi's proximity distance to waypoint proximity (checked against CompeGPS...
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 20:40:12 +0000 (20:40 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 20:40:12 +0000 (20:40 +0000)
gpsbabel/ozi.c

index 29b7c3eeb7b5094685c788fc242d5d264fd96b31..b35cbb40c1a7e5bbdc09689d463b6467c854445d 100644 (file)
@@ -367,6 +367,7 @@ ozi_parse_waypt(int field, char *str, waypoint * wpt_tmp)
         break;
     case 13:
         /* proximity distance - meters */
+       wpt_tmp->proximity = atof(str);
         break;
     case 14:
         /* altitude in feet */
@@ -657,9 +658,14 @@ ozi_waypt_pr(const waypoint * wpt)
     index++;
 
     fprintf(file_out,
-            "%d,%s,%.6f,%.6f,%.5f,%d,%d,%d,%d,%d,%s,%d,%d,%d,%.0f,%d,%d,%d\r\n",
+            "%d,%s,%.6f,%.6f,%.5f,%d,%d,%d,%d,%d,%s,%d,%d,",
             index, shortname, wpt->latitude, wpt->longitude, ozi_time, 0,
-            1, 3, 0, 65535, description, 0, 0, 0, alt_feet, 6, 0, 17);
+            1, 3, 0, 65535, description, 0, 0);
+    if (wpt->proximity > 0)
+       fprintf(file_out, "%.1f,", wpt->proximity);
+    else
+       fprintf(file_out,"0,");
+    fprintf(file_out, "%.0f,%d,%d,%d\r\n", alt_feet, 6, 0, 17);
 
     xfree(description);
     xfree(shortname);